package ua.amsoft.brelok.chart;

import org.achartengine.renderer.XYMultipleSeriesRenderer;

import ua.amsoft.brelok.dto.ChartRendererParameters;

public abstract class BrelokXYChartFactory {
    
    /**
     * An abstract factory method for creation a BarChart
     * 
     * @param renderer - {@link XYMultipleSeriesRenderer}
     * @param rendererParameters {@link ChartRendererParameters} rendering data
     *        values
     * @return {@link BrelokBarChart}
     */
    protected abstract BrelokBarChart createChart(final XYMultipleSeriesRenderer renderer,
            final ChartRendererParameters rendererParameters);
    
    /**
     * @param barChart
     * @param renderer
     * @param rendererParameters
     * @return
     */
    public BrelokBarChart createChartToDraw(final XYMultipleSeriesRenderer renderer,
            final ChartRendererParameters rendererParameters) {
        return createChart(renderer, rendererParameters);
    }
    
}
